import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/model',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/model/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/model',
    method: 'put',
    data
  })
}

// 大版本下拉框
export function queryAllPubVersionByProjSub(params) {
  return request({
    url: 'api/modelPubVersion/queryAllPubVersionByProjSub',
    method: 'get',
    params
  })
}

// 查询大版本下的模型 
export function queryAllModelByPubVersion(params) {
  return request({
    url: 'api/modelPubVersionGroup/queryAllModelByPubVersion',
    method: 'get',
    params
  })
}

// 查询显示内容对应的详情
export function queryAccessBindingModel(params) {
  return request({
    url: 'api/model/queryAccessBindingModel',
    method: 'get',
    params
  })
}
export default { add, edit, del, queryAllPubVersionByProjSub, queryAllModelByPubVersion, queryAccessBindingModel }
